home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJTST200.ZIP / tests / debug / common / args.c next >
Encoding:
C/C++ Source or Header  |  1995-08-27  |  434 b   |  24 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <crt0.h>
  4.  
  5. int _crt0_startup_flags =
  6.   _CRT0_FLAG_PRESERVE_UPPER_CASE
  7.   |_CRT0_FLAG_USE_DOS_SLASHES;
  8.  
  9. void
  10. main(int argc, char **argv)
  11. {
  12.   int i;
  13.  
  14.   FILE *f = fopen("nul", "r");
  15.   fclose(f);
  16.  
  17.   printf("program: `%s'\n", argv[0]);
  18.   printf("   args:");
  19.   for (i=1; i<argc; i++)
  20.     printf(" %s", argv[i]);
  21.   printf("\n   $FOO: `%s'\n", getenv("FOO"));
  22.   exit(0);
  23. }
  24.